﻿using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;

namespace PrivateTracker.Service.Core;
/// <summary>
/// 系统用户表种子数据
/// </summary>
public class SysUserSeedData : IEntitySeedData<SysUser>
{
    /// <summary>
    /// 种子数据
    /// </summary>
    /// <param name="dbContext"></param>
    /// <param name="dbContextLocator"></param>
    /// <returns></returns>
    public IEnumerable<SysUser> HasData(DbContext dbContext, Type dbContextLocator)
    {
        return new[]
        {
                //超级管理员
                new SysUser{TenantId=0, Id=142307070910551, Account="superAdmin", NickName="superAdmin", Password="e10adc3949ba59abbe56e057f20f883e", Birthday=DateTimeOffset.Now, Sex=Gender.MALE, IsDeleted=false,PassKey=Guid.NewGuid().ToString("N").ToLower() },
                //租户内的用户
                new SysUser{TenantId=142307070918780, Id=142307070910552, Account="admin",  NickName="admin", Password="e10adc3949ba59abbe56e057f20f883e", Birthday=DateTimeOffset.Now, Sex=Gender.MALE, IsDeleted=false ,PassKey=Guid.NewGuid().ToString("N").ToLower() },
                new SysUser{TenantId=142307070918780, Id=142307070910553, Account="testUser",  NickName="霸王龙", Password="e10adc3949ba59abbe56e057f20f883e", Birthday=DateTimeOffset.Now, Sex=Gender.MALE, IsDeleted=false ,PassKey=Guid.NewGuid().ToString("N").ToLower() },

                new SysUser{TenantId=142307070918781, Id=142307070910554, Account="admin01", NickName="admin01", Password="e10adc3949ba59abbe56e057f20f883e", Birthday=DateTimeOffset.Now, Sex=Gender.MALE, IsDeleted=false,PassKey=Guid.NewGuid().ToString("N").ToLower() },
            };
    }
}